package com.lej.home.publish

import com.alibaba.android.arouter.facade.annotation.Route
import com.lej.core.base.BaseActivity
import com.lej.core.base.statusHeight
import com.lej.core.dsl.margin_top_px
import com.lej.core.router.CRouter
import com.lej.core.utils.extention.PageState
import com.lej.core.utils.extention.router
import com.lej.core.utils.extention.showPageState
import com.lej.home.BR
import com.lej.home.R
import com.lej.home.databinding.HomeActHomePublishBinding
import com.qmuiteam.qmui.kotlin.onClick
import com.qmuiteam.qmui.util.QMUIStatusBarHelper

@Route(path = CRouter.homePublish)
class HomePublishActivity : BaseActivity<HomeActHomePublishBinding, HomePublishViewModel>() {
    override fun getLayout(): Int = R.layout.home_act_home_publish

    override fun initVariableId(): Int = BR.vm

    override fun initData() {
        super.initData()
        QMUIStatusBarHelper.translucent(this)
        QMUIStatusBarHelper.setStatusBarLightMode(this)
        binding.rl.margin_top_px = statusHeight

        binding.flContainer.showPageState(PageState.Empty("你还没有发布动态哦~", "发布一条新动态", true) {
            it.onClick {
                router(CRouter.publishAct)
            }
        })
        binding.ivBack.onClick {
            onBackPressed()
        }

    }
}